package main

import (
	"fmt"
	"math/cmplx"
)
/**
基本类型
bool

string

int  int8  int16  int32  int64
uint uint8 uint16 uint32 uint64 uintptr
byte // uint8 的别名
rune // int32 的别名
    // 表示一个 Unicode 码点

float32 float64
complex64 complex128
 */
var (
	ToBe   bool       = false
	MaxInt uint64     = 1<<64 - 1
	z      complex128 = cmplx.Sqrt(-5 + 12i)
)

func main() {
	fmt.Printf("Type: %T Value: %v\n", ToBe, ToBe)
	fmt.Printf("Type: %T Value: %v\n", MaxInt, MaxInt)
	fmt.Printf("Type: %T Value: %v\n", z, z)
	/**
	Type: bool Value: false
	Type: uint64 Value: 18446744073709551615
	Type: complex128 Value: (2+3i)
	 */

	i := 42           // int
	f := 3.142        // float64
	g := 0.867 + 0.5i // complex128 MARK 没指定类型 取决于常量的精度
	fmt.Printf("Type: %T Value: %v\n", i, i)
	fmt.Printf("Type: %T Value: %v\n", f, f)
	fmt.Printf("Type: %T Value: %v\n", g, g)
}
